﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace BlueLotus7.SSQAnalysisCore
{
    public class SSQLotteryData : BaseBsonObject, ICloneable
    {
        #region Properties

        public BallCollection RedBalls
        {
            get;
            protected set;
        }

        public BallCollection BlueBalls
        {
            get;
            protected set;
        }

        #endregion

        public SSQLotteryData()
            : base()
        {
            this.RedBalls = new BallCollection(Constant.RedBallQuantity);
            this.BlueBalls = new BallCollection(Constant.BlueBallQuantity);
        }

        //#region Methods

        //#endregion

        //#region Protected methods

        //protected void AppendValues(StringBuilder stringBuilder, decimal[] sources)
        //{
        //    if (stringBuilder != null && sources != null)
        //    {
        //        for (int i = 0; i < sources.Length; i++)
        //        {
        //            stringBuilder.AppendLineWithFormat("{0}: {1}%", (i + 1).ToString("00"), sources[i].ToString(".0000"));
        //        }
        //    }
        //}

        //#endregion

        /// <summary>
        /// Creates a new object that is a copy of the current instance.
        /// </summary>
        /// <returns> A new object that is a copy of this instance.</returns>
        public virtual object Clone()
        {
            SSQLotteryData result = new SSQLotteryData();
            result.RedBalls = this.RedBalls.Clone() as BallCollection;
            result.BlueBalls = this.BlueBalls.Clone() as BallCollection;

            return result;
        }

        /// <summary>
        /// 
        /// </summary>
        public void Clear()
        {
            this.RedBalls.Clear();
            this.BlueBalls.Clear();
        }
    }
}
